package pd.struct;

/**
 * Represents a method of tree traversal.
 *
 * @author Joshua Swank
 */
public enum Traversal
{
    //I did not include INORDER because of confusion concerning n-ary trees

    /**
     * Represents preorder traversal.
     */
    PREORDER,

    /**
     * Represents postorder traversal.
     */
    POSTORDER;

    /**
     * Returns the default traversal method. Currently postorder.
     *
     * @return the default traversal method.
     */
    public static Traversal getDefault()
    {
        return POSTORDER;
    }
}